<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOffersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('offers', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('fid')->comment('流程历史记录id');
            $table->integer('resume_id')->comment('简历id');
            $table->string('name', 255)->comment('姓名');
            $table->integer('user_id')->comment('用户id');
            $table->integer('company_id')->comment('公司id');
            $table->string('mobile', 64)->comment('联系电话');
            $table->string('email', 255)->comment('邮箱');
            $table->integer('entry_time')->comment('入职日期');
            $table->string('salary', 64)->comment('薪资');
            $table->string('address', 255)->comment('公司地址');
            $table->string('dept', 255)->comment('部门名称');
            $table->string('position', 255)->comment('岗位名称');
            $table->tinyInteger('status')->default(0)->comment('是否删除 1：是 0：否');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `offers` comment 'offer发送表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('offers');
    }
}
